#include "editormanager.h"
#include "gameObjects/abstractgameobject.h"
#include "document.h"
#include "widgets/editorview.h"
#include "visualobjecteditor.h"

using namespace ObjectEditors;

EditorManager::EditorManager(QObject *parent)
    : StateManager(parent)
{
	m_visualObjectEditor = new VisualObjectEditor(*this);
	registerState(m_visualObjectEditor);
}

void EditorManager::onDocumentChanged( QPointer<Document> document )
{

}

void EditorManager::paint( QPainter& painter )
{
	if(currentState())
	{
		QPointer<AbstractEditor> editor = qobject_cast<AbstractEditor*>(currentState());
		Q_ASSERT(editor);
		editor->paint(painter);
	}
}
